class Cat :
    def __init__(self, name, age):
        self.name = name
        self.age = age

    #类方法   Cat（类）可以调用
    @classmethod
    def speak(cla):
        print('shout~~~~~~~~')
    #实例方法
    def miao(self):
        print('miao~~~~~~')
    #静态方法
    @staticmethod
    def test():
        print('test')



cat = Cat('coke',25)
print(cat.name)
print(cat.age)
cat.miao()
cat.test()

print('_____________________')


#print(Cat.name)   实例属性不能用类调用
Cat.miao(self=cat)
Cat.speak()
Cat.test()


print('_____________________')


# 私有 属性和方法前加双"_"
class Dog:
    __name = 'dog'

    def __eat(self):
        self.age = 18
        print('Dog eat')
dog =Dog()


class Car:
    def __init__(self):
        self.color = 'blue'
        print('对象被创建')

    # def __del__(self):
    #     print('对象被销毁')